package net.monkeybros.sbus.model;

import com.neurospeech.wsclient.*;
import org.w3c.dom.*;

public class InfoPosicion extends WSObject
{
	
	private Integer _seccion;
	public Integer getseccion(){
		return _seccion;
	}
	public void setseccion(Integer value){
		_seccion = value;
	}
	private Integer _offset;
	public Integer getoffset(){
		return _offset;
	}
	public void setoffset(Integer value){
		_offset = value;
	}
	
	public static InfoPosicion loadFrom(Element root) throws Exception
	{
		if(root==null){
			return null;
		}
		InfoPosicion result = new InfoPosicion();
		result.load(root);
		return result;
	}
	
	
	protected void load(Element root) throws Exception
	{
		this.setseccion(WSHelper.getInteger(root,"seccion",false));
		this.setoffset(WSHelper.getInteger(root,"offset",false));
	}
	
	
	
	public Element toXMLElement(Element root)
	{
		Element e = root.getOwnerDocument().createElement("InfoPosicion");
		fillXML(e);
		return e;
	}
	
	public void fillXML(Element e)
	{
		WSHelper.addChild(e,"seccion",String.valueOf(_seccion),false);
		WSHelper.addChild(e,"offset",String.valueOf(_offset),false);
	}
	
}
